//开票历史状态
// 0待审批 1审核中 2不通过(已驳回) 3审批通过 4已撤销
export const statusList: {
	[key: string | number]: any
} = {
	'-1': {
		name: '无需审批',
		color: 'success',
		detailTab: [],
		operation: []
	},
	11: {
		name: '待处理',
		color: 'warning',
		detailTab: [],
		operation: [
			{
				name: '拒绝',
				field: 'refuse',
				sort: 1,
				type: '',
				action: ['mk_finance_invoicing_history_refuse']
			},
			{
				name: '处理',
				field: 'handle',
				sort: 0,
				type: 'primary',
				action: ['mk_finance_invoicing_history_handle']
			}
		]
	},
	1: {
		name: '审批中',
		color: 'processing',
		detailTab: [],
		operation: [
			{
				name: '撤销',
				field: 'revokeApproval',
				sort: 0,
				type: 'danger',
				action: ['mk_finance_invoicing_history_revoke']
			}
		]
	},
	2: {
		name: '已驳回',
		color: 'error',
		detailTab: [],
		operation: [
			{
				name: '重新提交',
				field: 'resubmit',
				sort: 0,
				type: 'danger',
				action: ['mk_finance_invoicing_history_resubmit']
			},
			{
				name: '作废',
				field: 'cancel',
				sort: 0,
				type: 'danger',
				action: ['mk_finance_invoicing_history_cancel']
			}
		]
	},
	4: {
		name: '已撤销',
		color: 'warning',
		detailTab: [],
		operation: [
			{
				name: '重新提交',
				field: 'resubmit',
				sort: 0,
				type: 'danger',
				action: ['mk_finance_invoicing_history_resubmit']
			},
			{
				name: '作废',
				field: 'cancel',
				sort: 0,
				type: 'danger',
				action: ['mk_finance_invoicing_history_cancel']
			}
		]
	},
	3: {
		name: '已通过',
		color: 'success',
		detailTab: [],
		operation: []
	},
	5: {
		name: '已作废',
		color: 'default',
		detailTab: [],
		operation: []
	},
	12: {
		name: '已拒绝',
		color: 'error',
		detailTab: [],
		operation: []
	}
}
/* 表格中计税模式绑定的数据 */
export const orientationList = [
	// {
	// 	value: 1,
	// 	label: '计税模式'
	// },
	{
		value: 2,
		label: '简易计税'
	},
	{
		value: 3,
		label: '一般计税'
	}
]

/* 表格优惠政策绑定数据 */
export const favouredPolicyList = [
	{
		value: 0,
		label: '无优惠'
	},
	{
		value: 1,
		label: '免税'
	},
	{
		value: 2,
		label: '不征税'
	}
	// {
	// 	value: 3,
	// 	label: '简易征收'
	// },
	// {
	// 	value: 4,
	// 	label: '按3%简易征收'
	// },
	// {
	// 	value: 5,
	// 	label: '按5%简易征收'
	// },
	// {
	// 	value: 4,
	// 	label: '按5%简易征收减按1.5%计征'
	// },
	// {
	// 	value: 4,
	// 	label: '即征即退'
	// },
	// {
	// 	value: 4,
	// 	label: '即征即退30%'
	// },
	// {
	// 	value: 4,
	// 	label: '即征即退50%'
	// },
	// {
	// 	value: 4,
	// 	label: '即征即退70%'
	// },
	// {
	// 	value: 4,
	// 	label: '即征即退100%'
	// },
	// {
	// 	value: 4,
	// 	label: '超税负3%即征即退'
	// },
	// {
	// 	value: 4,
	// 	label: '超税负8%即征即退'
	// },
	// {
	// 	value: 4,
	// 	label: '超税负12%即征即退'
	// },
	// {
	// 	value: 4,
	// 	label: '先征后退'
	// },
	// {
	// 	value: 4,
	// 	label: '50%先征后退'
	// },
	// {
	// 	value: 4,
	// 	label: '100%先征后退'
	// },
	// {
	// 	value: 4,
	// 	label: '增值税先征后返'
	// },
	// {
	// 	value: 4,
	// 	label: '稀土产品'
	// }
]

/* 发票类型 */
export const invoiceType = [
	{
		value: 0,
		label: '增值税电子普通发票'
	},
	{
		value: 0,
		label: '增值税电子专用发票'
	}
]

/* 发票类型 */
export const invoiceTypeOptions = [
	{
		value: 1,
		label: '增值税电子普通发票'
	},
	{
		value: 2,
		label: '增值税电子专用发票'
	},
	{
		value: 3,
		label: '电子发票（普通发票）'
	},
	{
		value: 4,
		label: '电子发票（增值税专用发票）'
	},
	{
		value: 5,
		label: '增值税普通发票'
	},
	{
		value: 6,
		label: '增值税专用发票'
	}
]

/* 冲红状态 */
export const flushingStateList = {
	// 1 信息表审核
	1: {
		color: 'processing',
		name: '信息表审核中'
	},
	// 2 信息表审核失败
	2: {
		color: 'error',
		name: '信息表审核失败'
	},
	3: {
		color: 'processing',
		name: '冲红中'
	},
	4: {
		color: 'warning',
		name: '冲红撤销'
	},
	5: {
		color: 'error',
		name: '冲红失败'
	},
	6: {
		color: 'success',
		name: '冲红成功'
	}
}
// 0审批中 1审批通过 2审批失败
export const redInfoData = {
	0: {
		color: 'processing',
		name: '信息表审核中'
	},
	1: {
		color: 'success',
		name: '信息表审核通过'
	},
	// 2 信息表审核失败
	2: {
		color: 'error',
		name: '信息表审核失败'
	}
}

/*发票状态  */
// 状态：0未开票 1开票中(开票异常) 2开票成功 3开票失败
export const invoiceStatusList = {
	4: {
		name: '开票异常',
		color: 'processing'
	},
	5: {
		name: '开票撤销',
		color: 'warning'
	},
	3: {
		name: '开票成功',
		color: 'success'
	},
	6: {
		name: '开票异常',
		color: 'processing'
	},
	7: {
		name: '开票失败',
		color: 'error'
	}
}

// 详情中每个发票的状态
export const invoiceDetailsStatusList = {
	0: {
		name: '未开票',
		color: 'processing'
	},
	1: {
		name: '未更新',
		color: 'processing'
	},
	2: {
		name: '开票异常',
		color: 'processing'
	},
	3: {
		name: '开票撤销',
		color: 'warning'
	},
	4: {
		name: '开票成功',
		color: 'success'
	},
	5: {
		name: '开票失败',
		color: 'error'
	}
}

export const invoiceDetailsStatusRedList = {
	0: {
		name: '未开票',
		color: 'processing'
	},
	1: {
		name: '未更新',
		color: 'processing'
	},
	2: {
		name: '冲红异常',
		color: 'processing'
	},
	3: {
		name: '冲红撤销',
		color: 'warning'
	},
	4: {
		name: '冲红成功',
		color: 'success'
	},
	5: {
		name: '冲红失败',
		color: 'error'
	}
}

// UNBILLED(0,"未开票"),
// NOT_UPDATED(1,"未更新"),
// INVOICING(2,"开票中"),
// REVOKED(3,"已撤销"),
// SUCCESSFUL_BILLING(4,"开票成功"),
// INVOICE_FAILURE(5,"开票失败"),

//列表总数
// 	审批状态：0待审批 1审核中 2不通过 3审批通过 4已撤销
export const invoiceCountsList = [
	{
		title: '全部',
		count: 0,
		field: 'total',
		value: ''
	},
	{
		title: '待处理',
		count: 0,
		field: 'beProcessed',
		value: 11
	},
	{
		title: '审批中',
		count: 0,
		field: 'underApproval',
		value: 1
	},
	{
		title: '已驳回',
		count: 0,
		field: 'reject',
		value: 2
	},
	{
		title: '已通过',
		count: 0,
		field: 'approvalCompleted',
		value: 3
	},
	{
		title: '已撤销',
		count: 0,
		field: 'revoke',
		value: 4
	},
	{
		title: '已作废',
		count: 0,
		field: 'invalid',
		value: 5
	},
	{
		title: '已拒绝',
		count: 0,
		field: 'decline',
		value: 12
	},
	{
		title: '无需审批',
		count: 0,
		field: 'notApproval',
		value: -1
	}
]

// 冲红/发票状态
export const multiplicationList = {
	0: '未推送',
	1: '推送成功',
	2: '推送失败',
	3: '开票成功',
	4: '开票异常',
	5: '开票撤销',
	6: '开票异常',
	7: '开票失败'
}

export const multiplicationData = {
	0: '未开票',
	1: '未更新',
	2: '开票异常',
	3: '开票撤销',
	4: '开票成功',
	5: '开票失败'
}
export const multiplicationRedData = {
	0: '未开票',
	1: '未更新',
	2: '冲红异常',
	3: '冲红撤销',
	4: '冲红成功',
	5: '冲红失败'
}

// 冲红状态
export const flushingStateData = {
	0: '未推送',
	// 1 2 专票使用
	1: '信息表审核中',
	2: '信息表审核失败',
	// 3: '冲红中',
	3: '推送成功',
	4: '冲红成功',
	5: '冲红撤销',
	6: '冲红异常',
	7: '冲红失败'
}

// 冲红详情状态
export const redStatusList = {
	'-1': {
		name: '无需审批',
		color: 'success',
		detailTab: [],
		operation: []
	},
	1: {
		name: '审批中',
		color: 'processing',
		detailTab: [],
		operation: [
			{
				name: '撤销',
				field: 'revokeApproval',
				sort: 0,
				type: 'default',
				action: ['mk_finance_invoicing_history_revoke']
			}
		]
	},
	2: {
		name: '已驳回',
		color: 'error',
		detailTab: [],
		operation: [
			{
				name: '重新提交',
				field: 'redBlood',
				sort: 0,
				type: 'primary',
				action: ['mk_finance_invoicing_history_red_resubmit']
			},
			{
				name: '作废',
				field: 'redRevoke',
				sort: 0,
				type: 'default',
				action: ['mk_finance_invoicing_history_red_cancel']
			}
		]
	},
	3: {
		name: '已通过',
		color: 'success',
		detailTab: [],
		operation: [
			// {
			// 	name: '撤销',
			// 	field: 'redCancel',
			// 	sort: 0,
			// 	type: 'default',
			// 	action: ['mk_finance_invoicing_history_red_revoke']
			// },
			// {
			// 	name: '重新推送',
			// 	field: 'pushAgain',
			// 	sort: 0,
			// 	type: 'primary'
			// 	// action: ['mk_finance_invoicing_history_red_cancel']
			// }
			// {
			// 	name: '查询结果',
			// 	field: 'queryResults',
			// 	sort: 0,
			// 	type: 'primary'
			// 	// action: ['mk_finance_invoicing_history_red_cancel']
			// }
		]
	},
	4: {
		name: '已撤销',
		color: 'warning',
		detailTab: [],
		operation: [
			{
				name: '重新提交',
				field: 'redBlood',
				sort: 0,
				type: 'primary',
				action: ['mk_finance_invoicing_history_red_resubmit']
			},
			{
				name: '作废',
				field: 'redRevoke',
				sort: 0,
				type: 'default',
				action: ['mk_finance_invoicing_history_red_cancel']
			}
		]
	},
	5: {
		name: '已作废',
		color: 'default',
		detailTab: [],
		operation: []
	}
}
